package com.hdc.lw.word_server.controller;

import com.alibaba.fastjson.JSONObject;
import com.hdc.lw.word_server.service.CollectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class Collecttroller {

    @Autowired
    private CollectService collectService;

    @RequestMapping("/collect")
    public String collectWord(Integer uid,Integer wid){
        return JSONObject.toJSONString(collectService.collectWord(uid,wid));
    }

    @RequestMapping("delcollect")
    public String delCollectWord(Integer uid,Integer wid){
        return JSONObject.toJSONString(collectService.delCollectWord(uid,wid));
    }
}
